#pragma once
#include <fcntl.h>
enum ERROR
{
    SUCCESS = 0,
    SOCKET_ERRO,
    BIND_ERRO,
    LISTEN_ERRO,
    READ_ERRO,
    USAGE_ERRO,
    FORK_ERRO,
    CONNECT_ERRO,
    ACCEPT_ERRO,
    OPEN_ERRO,
    SELECT_ERRO,
    POLL_ERRO,
    EPOLL_CREATE_ERRO,
    EPOLL_CTL_ERRO,
    EPOLL_WAIT_ERRO
};
class NoCopy
{
public:
    NoCopy(){}
    ~NoCopy(){}
    NoCopy(const NoCopy&) = delete;
    NoCopy& operator=(const NoCopy&) = delete;
};
void SetNonBlock(int fd)
{
    int f = fcntl(fd,F_GETFL);
    if(f<0)
    {
        return;
    }
    fcntl(fd,F_SETFL,f|O_NONBLOCK);
}
void Excepter()
{

}